﻿<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>{$web_name}</title>
	<meta name="keywords" content="{$web_keyword}">
	<meta name="description" content="{$web_description}">
	<tc_include file="Public:head" />
	<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/List/js/group_buy.css"/>
	<script type="text/javascript" src="/themes/wnsc/Public/js/jquery.min.js"></script>
</head>

<body>

<tc_include file="Public:nav" />
<?php
            $group_banner=sp_getslide(5);
        ?>
<!--banner-->
<div class="slide_wrap">
	<ul id="slides2" class="slide">
		<foreach name="group_banner" item="v" key="k">
			<li style="background:url('{$v.UpFilePathInfo}') no-repeat center top"><a href="{$v.ad_link}" target="_blank">pwstrick1</a></li>
		</foreach>

	</ul>
</div>

<!--banner end-->
<div class="main">
	<ul class="group-list">
		<foreach name="crowdfundinglist" item="cf">
			<li>
				<a href="{:U('shop/index',array('id'=>$cf['goods_id']))}" title="{$cf['title']}">
					<div class="p-img">
						<img alt="{$vo['title']}" src="{$cf['image']}">
						<div class="brand-time">
							<em class="time">
								<i></i>
								<span class="settime" id="groupbuy_countdown_{$cf['id']}"></span>
							</em>
						</div>
					</div>
					<div class="brand-info">
						<div class="brand-name-wrap clearfix">
							<div class="b-name">{$cf['title']}</div>
						</div>
						<div class="line"></div>
						<div class="b-price clearfix">

							<div class="fl">已筹
								<strong class="color">{$cf['now_money']}</strong>
								<span>&nbsp;元</span>
							</div>
							<div class="fr">
								<span class="buyer">{$cf['num']}人支持</span>
								<!--<span class="main-btn bg-color">马上抢</span>-->
							</div>
						</div>
					</div>
				</a>
			</li>
			<php>
				$time=time();
				$cha_time=(strtotime($cf['end_time'])-$time)*1000;
			</php>
			<script type="text/javascript">

                $().ready(function() {
                    var act_id = "{$cf['id']}";
                    var cha_time = "{$cha_time}";
                    if(cha_time>0){
                        $("#groupbuy_countdown_"+act_id).countdown({
                            time: cha_time,
                            leadingZero: true,
                            onComplete: function(event) {
                                $(this).parent().html("团购活动已结束！");
                            }
                        });
                    }else{
                        $("#groupbuy_countdown_"+act_id).parent().html("团购活动已结束！");
                    }

                });
			</script>
		</foreach>



	</ul>

</div>
<style>
	.page-num a{ float: left;text-align: center;border: 1px solid #eee;height: 35px;line-height: 35px;}
	.page-num span{float: left;text-align: center;border: 1px solid #eee;height: 35px;line-height: 35px;width: 35px;margin: 0 8px 0 3px;background: red;color: #fff;}
</style>
<!--分页-->
<div class="pull-right page-box" style="width: 1210px;margin: 0 auto;float: inherit;">

	<div id="pagination" class="page">

		<div class="page-wrap fr">
			<div class="total">共{$count}条记录</div>
		</div>
		<div class="page-num fr">
			{$page}
		</div>
	</div>

</div>

<!-- 底部 -->
<tc_include file="Public:footer" />
<tc_include file="Public:right" />

<script type="text/javascript" src="/themes/wnsc/Home/List/js/jquery.jslide.js"></script>
<script src="/themes/wnsc/Home/List/js/jquery.countdown.js"></script>
<script>
    //轮播
    $(function(){
        $('#slides2').jslide();
    })
    <php>if(isset($_GET['type'])){</php>

        $(function(){
            $("html, body").scrollTop(0).animate({scrollTop: $("#goods_recommend").offset().top});
        })

        <php>}</php>
</script>
</body>

</html>